package com.allwees.bs.core.model.user.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.allwees.bs.core.model.user.constant.ESignInCycleType;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.util.Date;

/**
 * status 0-正常 -1-超时的ESignInCycleType
 */
@Getter
@Setter
@Accessors(chain = true)
public abstract class UserSignLogModel implements Comparable<UserSignLogModel>{

    private static final long serialVersionUID = 7296729963590202055L;
    @TableId(type = IdType.AUTO)
    @JsonIgnore
    protected Integer id;

    @Column(length = 64)
    protected String userUuid;

    protected String signInAt;

    @Column(length = 48)
    @Enumerated(EnumType.STRING)
    protected ESignInCycleType cycleType;

    @TableField(fill = FieldFill.INSERT)
    protected Integer status;

    @TableField(fill = FieldFill.INSERT)
    protected Date createdAt;
}
